package com.huishu.goods.mapper;

import com.huishu.commons.pojo.vo.GiveProductVO;
import com.huishu.goods.pojo.model.ProductGiveDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author generator@ljj
 * @since 2023-04-11
 */
public interface ProductGiveMapper extends BaseMapper<ProductGiveDO> {

    /**
     * 根据商品id查询赠品
     * @param goodsIds
     * @return
     */
    List<GiveProductVO> findGiveByProductIds(@Param("ids") List<Long> goodsIds,@Param("type") Integer type);

    /**
     * 查询满减赠品
     * @param fullReductionIds
     * @return
     */
    List<GiveProductVO> findGiveByFullReductionIds(@Param("ids") List<Long> fullReductionIds);
}
